<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>日志管理</title>

		<%@ include file="/commons/css_js_head.jsp"%>


		<script type="text/javascript">
//复写Url
doListUrl = "${ctx }/base/userLoginLogAction!doList.ts";
doDelUrl = "${ctx }/base/userLoginLogAction!doDelete.ts"
//查询
function doQuery()
{
  	var _form = document.forms[0];
	if (doListUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}
	_form.action = doListUrl;
	_form.submit();
}

//删除
function doDel(){
	var _form = document.forms[0];
	if (doDelUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}
	
	if(!confirm("你确定要删除记录吗？")){
		return ;
	}
	
	_form.action = doDelUrl;
	_form.submit();
}

</script>


	</head>
	<body style="overflow-x: hidden">

		<!-- 标题 -->
		<div class="mTitle">
			<span class="hidsearch"><a href="javascript:void(0)"
				onClick="return chg('searchList');" id="ImgArrow"> <img
						src="${ctx}/images/icon_up.gif" id="imgButton" />
			</a> </span>
			
		</div>

		<!--list -->
		<div class="searchBar" id="searchList" style="display: block;">
			<form action="/base/userLoginLogAction!doList" method="post" name="form1">
			   <s:hidden name="type" ></s:hidden>
				<table class="searchTable">
					<tr>
						<th>
							用户名：
						</th>
						<td>
							<s:textfield id="operator"  name="operator" theme="simple"></s:textfield>
						</td>
						<th>
							开始日期：
						</th>
							<td>
							<s:textfield id="opdate" name="opdate"  theme="simple" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></s:textfield>
						</td>
						<th>
							结束日期：
						</th>
							<td>
							<s:textfield id="opdateend" name="opdateend" theme="simple" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></s:textfield>
						</td>
						<td>
							<input name="btn_query" type="button" class="btn" value="查询"
								onclick="doQuery();" />
						</td>
						<td>
							<input name="btn_query" type="button" class="btn" value="删除"
								onclick="doDel();" />
						</td>
					</tr>
				</table>
			</form>
		</div>
		<div class="mainList">

			<table class="listTable">
				<tr>
					<th>序号</th>
					<th>
						用户
					</th>
					<th>
						ip地址
					</th>
					<th>
						时间
					</th>
					<th>
						备注
					</th>
					<th>
						类型
					</th>
					
				</tr>

				<c:forEach var="systemlog" varStatus="status" items="${pager.data}">
					<tr align=center>
						<td>${status.index+1} </td>
						<td>
							${systemlog.operator}
						</td>
						<td>
							${systemlog.machine}
						</td>
						<td>
							${systemlog.opdate}
						</td>
						<td>
							${systemlog.remark}
						</td>
						
						<td>
						 <c:if test="${systemlog.type == '1'}"><span>用户登录</span></c:if>
						    <c:if test="${systemlog.type == '2'}"><span>用户操作</span></c:if>
						</td>
						
						
					</tr>
				</c:forEach>
			</table>
		</div>
		<!--end list -->

		<!-- 分页区域  -->
<%@ include file="/page/pager.jsp"%>

<script type="text/javascript">
ajaxAnywhere.formName = "form1";
ajaxAnywhere.getZonesToReload = function() {
    return "zoneList";
}
</script>

	</body>
</html>
